<!DOCTYPE html>
<html>
<head>
	<title>History article</title>
	<meta charset="utf-8">
	<script>
		function hideSensitive() {
			// 获取输入框和所有 p 标签
			var input = document.getElementById("inputSensitive");
			var paragraphs = document.getElementsByTagName("p");
			// 获取敏感字符
			var sensitive = input.value;
			// 遍历所有 p 标签
			for (var i = 0; i < paragraphs.length; i++) {
				// 将敏感字符替换成 "*"
				var content = paragraphs[i].innerHTML;
				content = content.replace(new RegExp(sensitive, "gi"), "*");
				paragraphs[i].innerHTML = content;
			}
		}
	</script>
</head>
<body>
	<h1>An article</h1>
	<p>
		History grounds XX in XX roots. 
		History is an important and interesting field of study, 
		and learning the history of ZZ home country can give ZZ a deeper, 
		more meaningful glimpse into ZZ ancestral pasts, and how ZZ got to where we are today. 
	</p>
	<p>
		Many people feel like they need a sense of cultural belonging, 
		which is something that studying ZZ roots and being open-minded 
		to the evolution of ZZ culture can provide.
		History enriches ZZ experience. 
	</p>
	<p>
		Reading history is an amazing experience because it enables ZZ to reflect on 
		the social and economic life of the XX living long time ago.
	</p>
	<input type="text" id="inputSensitive">
	<button onclick="hideSensitive()">确认</button>
</body>
</html>